
const { ccclass, property } = cc._decorator;

@ccclass
export default class ShakeEarComp extends cc.Component {

    // @property(cc.Node)
    // ear: cc.Node = null;

    @property
    dir: number = 1;

    @property
    angle: number = 10;

    @property
    time: number = 0.5;


    start() {
        cc.tween(this.node).repeatForever(cc.tween(this.node).to(this.time, { angle: this.dir * this.angle }).to(this.time, { angle: -this.dir * this.angle })).start()
    }




}
